// ==========================================================================
// GFast自动生成service操作代码。
// 生成日期：2024-11-11 20:33:48
// 生成路径: internal/app/system/service/addresses.go
// 生成人：王中阳
// desc:收货地址
// company:云南奇讯科技有限公司
// ==========================================================================

package service

import (
	"context"

	"github.com/gogf/gf/v2/net/ghttp"
	"github.com/tiger1103/gfast/v3/internal/app/system/model"
)

type IAddresses interface {
	List(ctx context.Context, req *model.AddressesSearchReq) (res *model.AddressesSearchRes, err error)
	GetExportData(ctx context.Context, req *model.AddressesSearchReq) (listRes []*model.AddressesInfoRes, err error)
	Import(ctx context.Context, file *ghttp.UploadFile) (err error)
	GetById(ctx context.Context, Id int) (res *model.AddressesInfoRes, err error)
	Add(ctx context.Context, req *model.AddressesAddReq) (err error)
	Edit(ctx context.Context, req *model.AddressesEditReq) (err error)
	Delete(ctx context.Context, Id []int) (err error)
	LinkedAddressesDataSearch(ctx context.Context) (res *model.LinkedAddressesDataSearchRes, err error)
}

var localAddresses IAddresses

func Addresses() IAddresses {
	if localAddresses == nil {
		panic("implement not found for interface IAddresses, forgot register?")
	}
	return localAddresses
}

func RegisterAddresses(i IAddresses) {
	localAddresses = i
}
